﻿@{
    ViewBag.Title = "结算分红明细";
    Layout = "~/Views/Shared/_Index.cshtml";
}
<script>
    var balanceId = $.request("balanceId");
    $(function () {
        gridList();
    })
    function gridList() {
        var $gridList = $("#gridList");
        $gridList.dataGrid({
            url: "/BizManage/BalanceRecord/GetGridJsonByBalanceId?balanceId=" + balanceId,
            height: $(window).height() - 90,
            colModel: [
                { label: '账号', name: 'Account', width: 100, align: 'left' },
                { label: '姓名', name: 'RealName', width: 100, align: 'left' },
                { label: '手机号', name: 'MobilePhone', width: 100, align: 'left' },
                {
                    label: '结算积分数量', name: 'F_BonusAmount', width: 100, align: 'center', sortable: false,
                    formatter: function (cellvalue, options, rowObject) {
                        return cellvalue == null ? "" : parseFloat(cellvalue).toFixed(2);
                    }
                },
                {
                    label: '积分类型', name: 'F_BonusType', width: 100, align: 'center', sortable: false,
                    formatter: function (cellvalue) {
                        switch (cellvalue) {
                        case 0: return "广告"; break;
                            case 1: return "消费补贴"; break;
                        case 3: return "经理奖励"; break;
                        }
                    }
                },
                {
                    label: '结算时间', name: 'F_BonusTime', width: 150, align: 'left',
                    formatter: "date", formatoptions: { srcformat: 'Y-m-d', newformat: 'Y-m-d' }
                }
            ],
            pager: "#gridPager",
            sortname: 'F_BonusTime desc',
            viewrecords: true
        });
        /*$("#btn_search").click(function () {
            $gridList.jqGrid('setGridParam', {
                postData: {  salesmanId: salesmanId },
            }).trigger('reloadGrid');
        });*/
    }

    
</script>

@*<div class="topPanel">
    
    <div class="search">
        <table>
            <tr>
                <td>
                    <div class="input-group">
                        <input id="txt_keyword" type="text" class="form-control" placeholder="账号/联系人/终端编号/手机" style="width: 200px;">
                        <span class="input-group-btn">
                            <button id="btn_search" type="button" class="btn  btn-primary"><i class="fa fa-search"></i></button>
                        </span>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>*@
<div class="gridPanel">
    <table id="gridList"></table>
    <div id="gridPager"></div>
</div>
